package db.pojo;

import java.util.*;
import java.text.SimpleDateFormat;
import db.ext.Ea_demo_chinaareaExt;
@SuppressWarnings("unchecked")
/**
 * ea_demo_chinaarea
 */
public class Ea_demo_chinaarea {
	/**
	 * AREACODE
	 */
	public String aREACODE;
	/**
	 * AREANAME
	 */
	public String aREANAME;
	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static Ea_demo_chinaareaExt DB = new Ea_demo_chinaareaExt(); 
	
	public Ea_demo_chinaarea() {
		super();
	}
	
	public Ea_demo_chinaarea(String aREACODE, String aREANAME) {
		super();
		this.aREACODE = aREACODE; 
		this.aREANAME = aREANAME; 
	}
	
	public String getAREACODE() {
		return aREACODE;
	}

	public void setAREACODE(String aREACODE) {
		this.aREACODE = aREACODE;
	} 
	
	public String getAREANAME() {
		return aREANAME;
	}

	public void setAREANAME(String aREANAME) {
		this.aREANAME = aREANAME;
	} 
	
	
	public Map ea_demo_chinaareaToMap() {
		Map map = new HashMap();
		try {
			map.put("aREACODE",this.aREACODE);
			map.put("aREANAME",this.aREANAME);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}

	public Ea_demo_chinaarea mapToEa_demo_chinaarea(Map map){
		try {
			String aREACODE =  map.get("aREACODE").toString();
			String aREANAME =  map.get("aREANAME").toString();
			Ea_demo_chinaarea ea_demo_chinaarea = new Ea_demo_chinaarea(aREACODE, aREANAME);
			return ea_demo_chinaarea;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	} 
	
	public String toString(){
		return ea_demo_chinaareaToMap().toString();
	}
	
	//方便数据操作	
	public Ea_demo_chinaarea insert(){
		return DB.insert(this);
	}
	public Ea_demo_chinaarea update(){
		return DB.update(this);
	}
	
	public int delete(){
		return DB.delete(this);
	}
	
}
